package objetsBd;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author verpoorten
 */
@Entity
@Table(name = "Depense")
public class DepenseBd implements Serializable {

    private static final long serialVersionUID = 1L;
    private static final String SEQ_ID = "idDepense_sequence";
    @Id
    @Column(name = "idDepense")
    @SequenceGenerator(name = SEQ_ID,
            sequenceName = SEQ_ID, allocationSize = 1)
    @GeneratedValue(generator = SEQ_ID)
    private Long idDepense;
    @Column(name = "idLocation")
    private Long idLocation;
    @Column(name = "idBatiment")
    private Long idBatiment;
    @Column(name = "description")
    private String description;
    @Column(name = "montant")
    private Double montant;

    public static DepenseBd parIdDepense(Long idDepense) {
        DepenseBd depenseBd = new DepenseBd();
        depenseBd.setIdDepense(idDepense);
        return depenseBd;
    }

    public Long getIdLocation() {
        return idLocation;
    }

    public void setIdLocation(Long idLocation) {
        this.idLocation = idLocation;
    }

    public Long getIdBatiment() {
        return idBatiment;
    }

    public void setIdBatiment(Long idBatiment) {
        this.idBatiment = idBatiment;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Double getMontant() {
        return montant;
    }

    public void setMontant(Double montant) {
        this.montant = montant;
    }

    public Long getIdDepense() {
        return idDepense;
    }

    public void setIdDepense(Long idDepense) {
        this.idDepense = idDepense;
    }
}
